﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Security.Cryptography;
using NetworkLibrary;

namespace ClientTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        Client client;
        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {

            client = new Client("127.0.0.1", new RSAParameters(), new RSAParameters(), "TestName");
        }

        private void button2_Click(object sender, EventArgs e)
        {

            client.SendData(Encoding.ASCII.GetBytes(textBox1.Text), 0);
        }

        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            client.Shutdown();
        }
    }
}
